<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="index.css">
</head>

<body>
    <div class="box">

        <div class="yu"></div>
    </div>
    <script src="./jQuery.min.js"></script>
    <script>
        let box = $(".box");
        let num = 0;
        for (let i = 0; i < 30; i++) {
            let lefts = Math.floor(Math.random() * 5 + 2);
            let delay = Math.floor(Math.random() * 50 + 2);
            num += lefts;
            let div = $("<div>").addClass("yu").css({
                "left": `${num}%`,
                "top": `${lefts}%`,
                "animation-delay": `${delay/10}s`
            });
            box.append(div);
        }
    </script>
</body>

</html>